package mod.ule.first;

import mod.ule.first.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

public class MainActivity extends Activity {
	final String MODULE_TEXT = "This is first module for mod.ul.ed";
	final String MODULED_GET_TEXT = "mod.ul.ed.GET_TEXT";

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        if(getIntent().getAction().equals(MODULED_GET_TEXT)) {
        	Intent data = new Intent();
        	data.putExtra("text", MODULE_TEXT);
        	this.setResult(RESULT_OK, data);
        	finish();
        	return;
        }
        
        setContentView(R.layout.main);
    }
    
    public void onStart() {
    	super.onStart();
    	TextView v = (TextView) findViewById(R.id.hello);
        v.setText(MODULE_TEXT);
    }
}